body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    display: flex;
    min-height: 100vh;
}

.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

.nav-links span {
    margin-right: 10px;
}

/* 左侧导航栏 */
.sidebar {
    width: 250px;
    background-color: white;
    padding: 20px 0;
    height: 100vh;
    position: fixed;
    top: 75px;
    left: 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 0 20px 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.nav-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
}

.nav-item:hover {
    background-color: #f0f0f0;
}

.nav-item.active {
    background-color: #e3f2fd;
    border-left: 4px solid #2196F3;
}

.nav-item i {
    margin-right: 10px;
    color: #555;
}

.nav-category {
    padding-left: 30px;
}

.nav-category h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.nav-category p {
    margin: 5px 0 0;
    font-size: 13px;
    color: #777;
}

.main-content {
    flex: 1;
    padding: 100px 20px 20px;
    margin-left: 250px;
}

.question-types {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.type-btn {
    padding: 12px 20px;
    background-color: #eee;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
    min-width: 120px;
    text-align: center;
}

.type-btn:hover {
    background-color: #ddd;
}

.type-btn.active {
    background-color: #2196F3;
    color: white;
}

.question-container {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-height: 300px;
}

.section-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.exercise-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.exercise-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #ddd;
}

.exercise-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background-color: #e3f2fd;
}

.exercise-card h3 {
    margin-top: 0;
    color: #2196F3;
}

.exercise-card p {
    color: #666;
}




.submit-btn {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.submit-btn:hover {
    background-color: #0d8bf2;
}

.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式调整 */
@media (max-width: 992px) {
    .sidebar {
        width: 220px;
    }
    .main-content {
        margin-left: 220px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 10px 15px;
    }
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
        z-index: 900;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
}
.analysis-content {
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.6;
    margin-top: 8px;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.question-content, .passage, .prompt, .source-text, .answer, .translation  {
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.6;
}

.answer-area {
    white-space: pre-wrap;
    width: 100%;
    min-height: 150px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}
.option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-color: #f5f5f5;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.option:hover {
    background-color: #e0e0e0;
}

.option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.option-letter {
    font-weight: 600;
    color: #555;
    font-size: 16px;
    pointer-events: none;
}

.option input[type="radio"]:checked ~ .option-letter {
    color: white;
}

.option input[type="radio"]:checked {
    background-color: #2196F3;
}

.option input[type="radio"]:checked + .option-letter {
    background-color: #2196F3;
    border-radius: 8px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.practice-result {
    text-align: center;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.score {
    font-size: 24px;
    font-weight: bold;
    color: #4CAF50;
    margin: 15px 0;
}

.percentage {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}
.result-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

/* 查看排行榜按钮样式 */
.btn-view-ranking {
    padding: 10px 20px;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    margin: 0 10px;
}

.btn-view-ranking:hover {
    background-color: #3367d6;
}
